<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%--
  Created by IntelliJ IDEA.
  User: HYGK-PC
  Date: 2022/3/24
  Time: 18:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户管理</title>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css">
    <!-- 引入js文件时，写法不一样 -->
    <script src="${pageContext.request.contextPath}/bootstrap/js/jquery-3.5.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js"></script>



</head>
<body>


<%--导航栏--%>
<%@include file="/WEB-INF/public/navigation.jsp"%>

<div class="row">
    <%--左边的菜单--%>
    <%@include file="/WEB-INF/public/left_menu.jsp"%>


    <%--右边的内容--%>
    <div class="col-sm-10">
        <%--页头--%>
        <div class="page-header"style="margin-top: -20px;margin-bottom: 5px;">
            <h1>用户管理</h1>
        </div>
        <%--标签页--%>
        <div>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">用户列表</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="home">
                    <%--此处放一个面板--%>
                    <div class="panel panel-default">
                        <%--表格--%>
                        <table class="table table-bordered table-hover table-striped">
                            <tr>
                                <th>编号</th>
                                <th>用户名</th>
                                <th>性别</th>
                                <th>所属</th>
                                <th>密码</th>
                                <th>操作</th>
                            </tr>

                            <c:forEach items="${users}" var="users">
                                <tr>
                                    <td>${users.uid}</td>
                                    <td>${users.u_name}</td>
                                    <td>${users.u_gender}</td>
                                    <td>${users.u_org}</td>
                                    <td>${users.u_password}</td>
                                    <td>
                                        <a href="${pageContext.request.contextPath}/user/toUpdate?id=${users.id}">修改</a>
                                        &nbsp; | &nbsp;
                                        <a href="${pageContext.request.contextPath}/user/delete?id=${users.id}">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
</html>
